<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- Apple devices fullscreen -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="shortcut icon" type="image/x-icon" href="__PUBLIC__/images/favicon.ico" media="screen"/>
    <title>Loear v1.0</title>
    <script type="text/javascript">
        var SITEURL = window.location.host +'/index.php/admin';
    </script>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/css/main.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/js/jquery-ui/jquery-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/font/css/font-awesome.min.css" />
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery-ui/jquery-ui.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/admincp.js"></script>
    <script type="text/javascript" src="__PUBLIC__/static/js/jquery.validation.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/upgrade.js"></script>
</head>
<body>
{include file="public/menubox" /}
<div class="admincp-header">
    <div class="bgSelector"></div>
    <div id="foldSidebar"><i class="fa fa-outdent " title="展开/收起侧边导航"></i></div>
    <div class="admincp-name" onClick="javascript:openItem('welcome|Index');">
        <h2 style="cursor:pointer;">Loear v1.0<br>平台系统管理中心</h2>
    </div>
    <div class="nc-module-menu">
        <ul class="nc-row">
            <li data-param="system"><a href="javascript:void(0);">系统</a></li>
            <!--<li data-param="shop"><a href="javascript:void(0);">商城</a></li>
            <li data-param="mobile"><a href="javascript:void(0);">模板</a></li>-->
            <li data-param="resource"><a href="javascript:void(0);">插件</a></li>
        </ul>
    </div>
    <div class="admincp-header-r">
        <div class="manager">
            <dl>
                <dt class="name">{$admin_info.user_name}</dt>
                <dd class="group">管理员</dd>
            </dl>
            <span class="avatar">
                <!-- 屏蔽管理员头像上传 -->
                <!--<input name="_pic" type="file" class="admin-avatar-file" id="_pic" title="设置管理员头像"/>-->
                <img alt="" tptype="admin_avatar" src="__PUBLIC__/static/images/admint.png">
            </span>
            <i class="arrow" id="admin-manager-btn" title="显示快捷管理菜单"></i>
            <div class="manager-menu">
                <div class="title">
                    <h4>最后登录</h4>
                </div>
                <div class="login-date"> <?php echo date('m-d H:i',session('last_login_time'));?> <span>(IP: <?php echo session('last_login_ip');?> )</span> </div>
                <div class="title">
                    <h4>常用操作</h4>
                    <!--<a href="javascript:void(0)" class="add-menu">添加菜单</a>-->
                </div>
                <ul class="nc-row" tptype="quick_link">
                    <li><a href="javascript:void(0);" onclick="openItem('index|System')">站点设置</a></li>
                    <li> <a href="javascript:void(0);" onClick="layer.open({type: 2,title: '修改密码',shadeClose: true,shade: 0.3,area: ['30%', '40%'],content:'{:url('admin/Admin/modifyPwd', ['id'=>$admin_info['id']])}'});" class="edit-password">修改密码</a></li>
                </ul>
            </div>
        </div>
        <ul class="operate nc-row">
            <li><a class="style-color show-option" tptype="map_on" href="javascript:void(0);" title="查看全部管理菜单">&nbsp;</a></li>
            <li><a class="sitemap show-option" id="trace_show" href="{:url('admin/System/cleanCache')}" target="workspace" title="更新缓存">&nbsp;</a></li>
            <!--<li><a class="homepage show-option" target="_blank" href="/" title="新窗口打开首页">&nbsp;</a></li>-->
            <li><a class="login-out show-option" href="{:url('Admin/logout')}" title="安全退出">&nbsp;</a></li>
        </ul>
    </div>
    <div class="clear"></div>
</div>
<div class="admincp-container unfold">
    {include file="public/left" /}
    <div class="admincp-container-right">
        <div class="top-border"></div>
        <iframe src="" id="workspace" name="workspace" style="overflow: visible;" frameborder="0" width="100%" height="94%" scrolling="yes" onload="window.parent"></iframe>
    </div>
</div>
<script type="text/javascript">
    // 没有点击收货确定的按钮让他自己收货确定
    var timestamp = Date.parse(new Date());
    $.ajax({
        type:'post',
        url:"{:url('Admin/System/login_task')}",
        data:{timestamp:timestamp},
        timeout : 100000000, //超时时间设置，单位毫秒
        success:function(){
            // 执行定时任务
        }
    });
</script>
<script>
    $(document).ready(function(){
        if ($(window).width() < 660) {
            $('#foldSidebar > i').addClass('fa-indent').removeClass('fa-outdent');
            $('.sub-menu').removeAttr('style');
            $('.admincp-container').addClass('fold').removeClass('unfold');
        }
    });

    window.onresize = function(){
        if ($(window).width() < 660) {
            $('#foldSidebar > i').addClass('fa-indent').removeClass('fa-outdent');
            $('.sub-menu').removeAttr('style');
            $('.admincp-container').addClass('fold').removeClass('unfold');
        }
        if ($(window).width() > 660) {
            $('#foldSidebar > i').addClass('fa-outdent').removeClass('fa-indent');
            $('.nav-tabs').each(function(i){
                $(this).find('dl').each(function(i){
                    $(this).find('dd').css('top', (-70)*i + 'px');
                    if ($(this).hasClass('active')) {
                        $(this).find('dd').show();
                    }
                });
            });
            $('.admincp-container').addClass('unfold').removeClass('fold');
        }
    }
</script>
</body>
</html>